package com.gomore.opple.module.main.home;

import com.gomore.opple.BasePresenter;
import com.gomore.opple.BaseView;
import com.gomore.opple.rest.consumer.ConsumerDesigner;
import com.gomore.opple.rest.consumer.ConsumerQueryCondition;
import com.gomore.opple.rest.employee.LoginResult;
import com.gomore.opple.web.cgform.consumer.entity.TOConsumerEntity;

import java.util.List;

/**
 * Created by asus on 2016/12/27.
 */
public interface HomeContract {

    interface View extends BaseView<Presenter> {
        /**
         * 显示进度条
         */
        void showProgressDialog();

        /**
         * 隐藏进度条
         */
        void hideProgressDialog();

        /**
         * 展示消息
         *
         * @param msg 消息
         */
        void showMessage(String msg);

        /**
         * 展示消息
         *
         * @param msgId 消息id
         */
        void showMessage(int msgId);

        /**
         * 加载完毕
         */
        void showLoadMoreCompleted();

        /**
         * 刷新完毕
         */
        void showRefreshCompleted();

        /**
         * 展示类容
         */
        void showContent();

        /**
         * 刷新界面
         */
        void reflashView();

        /**
         * 展示欧普到家
         */
        void showDialog();

        /**
         * 跳转到保存地址
         *
         * @param storeCode
         */
        void goToAddressDialog(String storeCode);
    }

    interface Presenter extends BasePresenter {
        /**
         * 准备初始化数据
         */
        void prepareInitData();

        /**
         * 获取客户
         */
        void getConsumer(String mobile, boolean loadMore, boolean showDialog);

        /**
         * 获取本地数据
         *
         * @return
         */
        List<ConsumerDesigner> getData();

        /**
         * 保存客户最后访问时间
         *
         * @param consumerId
         */
        void saveTime(String consumerId);

        /**
         * 保存店code
         *
         * @param storeCode
         */
        void saveStoreCode(String storeCode);
    }
}
